package com.another.common.enums;

/**
 * @author : another
 * @version : 1.0
 * @description :
 * @date : 2019/7/20  下午2:21
 */
public class Enums {

    public Enums() {
    }


    /**
     * 微信相关URL
     */
    public static enum WeChatUrl {
        WeChatLogin("https://api.weixin.qq.com/sns/jscode2session", "微信登录"),
        UnifiedOrder("https://api.mch.weixin.qq.com/pay/unifiedorder", "统一下单"),
        admin2("U000000001", "管理员");

        private String code;
        private String value;

        private WeChatUrl(String code, String value) {
            this.code = code;
            this.value = value;
        }

        public String getCode() {
            return this.code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getValue() {
            return this.value;
        }

        public void setValue(String value) {
            this.value = value;
        }
    }


    /**
     * 签名方式
     */
    /*public static enum SignType {
        MD5, HMACSHA256
    }*/


    /**
     * 系统
     */
    public static enum SYSTEM {
        admin("U000000001", "管理员"),
        DEFAULT_PWD("123456", "默认密码"),
        smsCode("sms_code", "短信验证码key");


        private String code;
        private String value;

        private SYSTEM(String code, String value) {
            this.code = code;
            this.value = value;
        }

        public String getCode() {
            return this.code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getValue() {
            return this.value;
        }

        public void setValue(String value) {
            this.value = value;
        }
    }

    /**
     * @param null
     * @author Another
     * @version : 1.0
     * @description :  用户状态
     * @date 2019/7/23
     * @return
     */
    public static enum UserStatus {
        invalid("YHZT20", "无效"),
        effective("YHZT10", "有效");

        private String code;
        private String value;

        private UserStatus(String code, String value) {
            this.code = code;
            this.value = value;
        }

        public String getCode() {
            return this.code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getValue() {
            return this.value;
        }

        public void setValue(String value) {
            this.value = value;
        }
    }

    public static enum PlanType {
        DESIGNATION("HPLX10", "指定"),
        BID("HPLX20", "竞价");

        private String code;
        private String value;

        private PlanType(String code, String value) {
            this.code = code;
            this.value = value;
        }

        public String getCode() {
            return this.code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getValue() {
            return this.value;
        }

        public void setValue(String value) {
            this.value = value;
        }
    }



    public static enum SourceType {
        POST_NOW("LYLX10", "立即发布"),
        TIMING_GENERATION("LYLX20", "定时生成");

        private String code;
        private String value;

        private SourceType(String code, String value) {
            this.code = code;
            this.value = value;
        }

        public String getCode() {
            return this.code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getValue() {
            return this.value;
        }

        public void setValue(String value) {
            this.value = value;
        }
    }

    public static enum BidType {
        ALL("JJLX10", "全部"),
        PART("JJLX20", "部分");

        private String code;
        private String value;

        private BidType(String code, String value) {
            this.code = code;
            this.value = value;
        }

        public String getCode() {
            return this.code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getValue() {
            return this.value;
        }

        public void setValue(String value) {
            this.value = value;
        }
    }


    /**
     * @param null
     * @author Another
     * @version : 1.0
     * @description :  用户状态
     * @date 2019/7/23
     * @return
     */
    public static enum PortType {
        DOMESTIC("GKLX10", "国内"),
        FOREIGN("GKLX20", "国外");

        private String code;
        private String value;

        private PortType(String code, String value) {
            this.code = code;
            this.value = value;
        }

        public String getCode() {
            return this.code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getValue() {
            return this.value;
        }

        public void setValue(String value) {
            this.value = value;
        }
    }


    public static enum PlanStatus {
        CANCEL("HPZT00", "取消"),
        INITIAL("HPZT10", "初始"),
        TO_BE_SCHEDULED_FOR_RELEASE("HPZT20", "待定时发布"),
        PUBLISHED("HPZT30", "已发布"),
        BID("HPZT40", "已竞价"),
        END_OF_AUCTION("HPZT50", "竞价结束"),
        DEAL_DONE("HPZT60", "已成交");

        private String code;
        private String value;

        private PlanStatus(String code, String value) {
            this.code = code;
            this.value = value;
        }

        public String getCode() {
            return this.code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getValue() {
            return this.value;
        }

        public void setValue(String value) {
            this.value = value;
        }
    }

    public static enum TransType {
        DOMESTIC("XSLX10", "国内"),
        INTERNATIONAL("XSLX20", "国际");

        private String code;
        private String value;

        private TransType(String code, String value) {
            this.code = code;
            this.value = value;
        }

        public String getCode() {
            return this.code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getValue() {
            return this.value;
        }

        public void setValue(String value) {
            this.value = value;
        }
    }


    public static enum ProxyType {
        IMPORT_AGENT("DLMS10", "进口代理"),
        EXPORT_AGENT("DLMS20", "出口代理");

        private String code;
        private String value;

        private ProxyType(String code, String value) {
            this.code = code;
            this.value = value;
        }

        public String getCode() {
            return this.code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getValue() {
            return this.value;
        }

        public void setValue(String value) {
            this.value = value;
        }
    }



    /**
     * 充值类型
     */
    public static enum RechargeType {
        TheInitialAmount("CZLX10", "初始金额"),
        RechargeAmount("CZLX20", "充值金额");

        private String code;
        private String value;

        private RechargeType(String code, String value) {
            this.code = code;
            this.value = value;
        }

        public String getCode() {
            return this.code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getValue() {
            return this.value;
        }

        public void setValue(String value) {
            this.value = value;
        }
    }


    /**
     * 扣费类型
     */
    public static enum DeductionType {
        TheInitialAmount("KFLX10", "初始金额"),
        RechargeAmount("KFLX20", "充值金额");

        private String code;
        private String value;

        private DeductionType(String code, String value) {
            this.code = code;
            this.value = value;
        }

        public String getCode() {
            return this.code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getValue() {
            return this.value;
        }

        public void setValue(String value) {
            this.value = value;
        }
    }

    /**
     * 充值转态
     */
    public static enum RechargeStatus {
        LaunchApplication("CZZT10", "发起申请"),
        BeRechargedSuccessfully("CZZT20", "充值成功"),
        TopUpFailure("CZZT30", "充值失败");

        private String code;
        private String value;

        private RechargeStatus(String code, String value) {
            this.code = code;
            this.value = value;
        }

        public String getCode() {
            return this.code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getValue() {
            return this.value;
        }

        public void setValue(String value) {
            this.value = value;
        }
    }


    /**
     * 开票状态
     */
    public static enum InvoiceStatus {
        DidNotMakeOutAnInvoice("KPZT10", "未开票"),
        HasMakeOutAnInvoice("KPZT20", "已开票");

        private String code;
        private String value;

        private InvoiceStatus(String code, String value) {
            this.code = code;
            this.value = value;
        }

        public String getCode() {
            return this.code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getValue() {
            return this.value;
        }

        public void setValue(String value) {
            this.value = value;
        }
    }


    /**
     * @param null
     * @author Another
     * @version : 1.0
     * @description :  公司类型
     * @date 2019/7/23
     * @return
     */
    public static enum CompanyType {
        platform("GSLX00", "平台"),
        organizer("GSLX10", "主办方"),
        exhibitors("GSLX20", "参展商");

        private String code;
        private String value;

        private CompanyType(String code, String value) {
            this.code = code;
            this.value = value;
        }

        public String getCode() {
            return this.code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getValue() {
            return this.value;
        }

        public void setValue(String value) {
            this.value = value;
        }
    }


    /**
     * @author Another
     * @version : 1.0
     * @description :  请求类型
     * @date 2019/7/23
     * @return
     */
    public static enum RequestType {
        exhibition("QQLX10", "展会"),
        store("QQLX20", "店铺"),
        sample("QQLX30", "样本"),
        news("QQLX40", "新闻"),
        share("QQLX50", "分享"),
        video("QQLX60", "视频"),
        activity("QQLX70", "展会活动"),
        storeActivity("QQLX80", "参展商活动"),
        card("QQLX90", "名片"),
        ;

        private String code;
        private String value;

        private RequestType(String code, String value) {
            this.code = code;
            this.value = value;
        }

        public String getCode() {
            return this.code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getValue() {
            return this.value;
        }

        public void setValue(String value) {
            this.value = value;
        }
    }


    /**
     * @param
     * @author Another
     * @version : 1.0
     * @description :  公司状态
     * @date 2019/7/23
     * @return
     */
    public static enum CompanyStatus {
        ON("GSZT10", "启用"),
        OFF("GSZT20", "停用");

        private String code;
        private String value;

        private CompanyStatus(String code, String value) {
            this.code = code;
            this.value = value;
        }

        public String getCode() {
            return this.code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getValue() {
            return this.value;
        }

        public void setValue(String value) {
            this.value = value;
        }
    }


    /**
     * 用户类型
     */
    public enum CompanyUserTypeEnum {
        SYSADM("GSYHLX00", "系统管理员"),
        COMPANYADM("GSYHLX10", "公司管理员"),
        EMPLOYEE("GSYHLX20", "普通员工");

        private String index;
        private String value;

        private CompanyUserTypeEnum(String index, String value) {
            this.index = index;
            this.value = value;
        }

        public static String getDisplayIndex(String value) {
            for (CompanyUserTypeEnum userTypeEnum : CompanyUserTypeEnum.values()) {
                if (userTypeEnum.value.equals(value)) {
                    return userTypeEnum.index;
                }
            }
            return null;
        }

        public static String getDisplayValue(String index) {
            for (CompanyUserTypeEnum userTypeEnum : CompanyUserTypeEnum.values()) {
                if (userTypeEnum.index.equals(index)) {
                    return userTypeEnum.value;
                }
            }
            return null;
        }

        public String getIndex() {
            return index;
        }

        public void setIndex(String index) {
            this.index = index;
        }

        public String getValue() {
            return value;
        }

        public void setValue(String value) {
            this.value = value;
        }

    }


    /**
     * 样本类型
     */
    public enum ExhibitTypeEnums {
        PICTURE("ZPLX10", "图片"),
        VIDEO("ZPLX20", "视频"),
        ARTICLE("ZPLX30", "文章"),
        BY_VIDEO("ZPLX40", "轮播视频"),
        BUSINESS_CARD("ZPLX50", "名片");

        private String index;
        private String value;

        private ExhibitTypeEnums(String index, String value) {
            this.index = index;
            this.value = value;
        }

        public static String getDisplayIndex(String value) {
            for (ExhibitTypeEnums userTypeEnum : ExhibitTypeEnums.values()) {
                if (userTypeEnum.value.equals(value)) {
                    return userTypeEnum.index;
                }
            }
            return null;
        }

        public static String getDisplayValue(String index) {
            for (ExhibitTypeEnums userTypeEnum : ExhibitTypeEnums.values()) {
                if (userTypeEnum.index.equals(index)) {
                    return userTypeEnum.value;
                }
            }
            return null;
        }

        public String getIndex() {
            return index;
        }

        public void setIndex(String index) {
            this.index = index;
        }

        public String getValue() {
            return value;
        }

        public void setValue(String value) {
            this.value = value;
        }

    }


    /**
     * 有效状态
     */
    public enum StatusEnum {
        EFFECTIVE("YHZT10", "有效"), INVALID("YHZT00", "无效"), DELETED("YHZT80", "已删除");

        private String index;
        private String value;

        private StatusEnum(String index, String value) {
            this.index = index;
            this.value = value;
        }

        public static String getDisplayIndex(String value) {
            for (StatusEnum statusEnum : StatusEnum.values()) {
                if (statusEnum.value.equals(value)) {
                    return statusEnum.index;
                }
            }
            return null;
        }

        public static String getDisplayValue(String index) {
            for (StatusEnum statusEnum : StatusEnum.values()) {
                if (statusEnum.index.equals(index)) {
                    return statusEnum.value;
                }
            }
            return null;
        }

        public String getIndex() {
            return index;
        }

        public void setIndex(String index) {
            this.index = index;
        }

        public String getValue() {
            return value;
        }

        public void setValue(String value) {
            this.value = value;
        }

    }


    /**
     * 名片类型
     */
    public enum CardType {
        ENTERPRISE_BUSINESS_CARD("MPLX10", "企业名片"),
        EMPLOYEE_CARD("MPLX20", "员工名片");

        private String index;
        private String value;

        private CardType(String index, String value) {
            this.index = index;
            this.value = value;
        }

        public static String getDisplayIndex(String value) {
            for (CardType cardType : CardType.values()) {
                if (cardType.value.equals(value)) {
                    return cardType.index;
                }
            }
            return null;
        }

        public static String getDisplayValue(String index) {
            for (CardType cardType : CardType.values()) {
                if (cardType.index.equals(index)) {
                    return cardType.value;
                }
            }
            return null;
        }

        public String getIndex() {
            return index;
        }

        public void setIndex(String index) {
            this.index = index;
        }

        public String getValue() {
            return value;
        }

        public void setValue(String value) {
            this.value = value;
        }

    }


    /**
     * 展会用户类型
     */
    public enum ExhibitionUserType {
        THE_ORGANIZERS("YHLX10", "主办方"),
        EXHIBITING_COMPANY("YHLX20", "参展商"),
        VISITOR("YHLX30", "参观者");

        private String index;
        private String value;

        private ExhibitionUserType(String index, String value) {
            this.index = index;
            this.value = value;
        }

        public static String getDisplayIndex(String value) {
            for (CardType cardType : CardType.values()) {
                if (cardType.value.equals(value)) {
                    return cardType.index;
                }
            }
            return null;
        }

        public static String getDisplayValue(String index) {
            for (CardType cardType : CardType.values()) {
                if (cardType.index.equals(index)) {
                    return cardType.value;
                }
            }
            return null;
        }

        public String getIndex() {
            return index;
        }

        public void setIndex(String index) {
            this.index = index;
        }

        public String getValue() {
            return value;
        }

        public void setValue(String value) {
            this.value = value;
        }

    }


    /**
     * 名片类型
     */
    public enum ShareType {

        the_exhibition("FXLX10", "展会"),
        the_store("FXLX20", "店铺"),
        specimen("FXLX30", "样本"),
        business_card("FXLX40", "名片"),
        news("FXLX50", "新闻");

        private String index;
        private String value;

        private ShareType(String index, String value) {
            this.index = index;
            this.value = value;
        }

        public static String getDisplayIndex(String value) {
            for (CardType cardType : CardType.values()) {
                if (cardType.value.equals(value)) {
                    return cardType.index;
                }
            }
            return null;
        }

        public static String getDisplayValue(String index) {
            for (CardType cardType : CardType.values()) {
                if (cardType.index.equals(index)) {
                    return cardType.value;
                }
            }
            return null;
        }

        public String getIndex() {
            return index;
        }

        public void setIndex(String index) {
            this.index = index;
        }

        public String getValue() {
            return value;
        }

        public void setValue(String value) {
            this.value = value;
        }

    }
}
